package command;

import java.util.ArrayList;
import java.util.List;

import server.KVMessage.StatusType;
import util.IKeyValueStorage;

public class StorageCommandInvoker implements ICommandInvoker {
	private List<ICommand> history;
	 
	public StorageCommandInvoker() {
		history = new ArrayList<ICommand>();
	}
	 
	public Object execute(ICommand cmd) {
		this.history.add(cmd); 
	    return cmd.execute();
	}
	   
	public List<ICommand> getCommandHistory() {
		return history;
	}
}
